﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="ExamMgmView.aspx.cs" Inherits="Skynet.WebSite.Administracion.ExamsMgmView" %>

<asp:Content ID="AjaxContent" ContentPlaceHolderID="AjaxContent" runat="server">
    <asp:ScriptManagerProxy runat="server">        
    </asp:ScriptManagerProxy>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">

<table width="100%">
    <tr>
        <td>
            &nbsp;</td>
        <td>           
            <h1>List of Exams</h1>

            </td>
        <td>          
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>           
            &nbsp;</td>
        <td>          
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            Category</td>
        <td>           
        <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always" > 
        <ContentTemplate>
            <asp:DropDownList ID="ddlCategories" runat="server" DataValueField="Id"  
                DataTextField="Title" AutoPostBack="True" DataSourceID="odsCategories" 
                onselectedindexchanged="ddlCategories_SelectedIndexChanged">
            </asp:DropDownList>           

            


            </ContentTemplate>
            

        </asp:UpdatePanel>

            
        </td>
        <td>          
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            Exams</td>
        <td>           
            <asp:LinkButton ID="lbNewExam" runat="server" onclick="lbNewExam_Click">New Exam</asp:LinkButton>
        </td>
        <td>          
            &nbsp;</td>
    </tr>
    <tr>
        <td colspan="2">

            <asp:UpdatePanel runat="server" UpdateMode="Always" >
                <ContentTemplate>
                        <asp:GridView ID="gvExams" runat="server" AutoGenerateColumns="False" 
                        DataKeyNames="Id" DataSourceID="odsExams" 
                        onselectedindexchanged="gvExams_SelectedIndexChanged">
                        <Columns>
                            <asp:CommandField ShowDeleteButton="True" ShowSelectButton="True" />
                            <asp:BoundField DataField="Id" HeaderText="Id"   Visible="false"/>
                            <asp:BoundField DataField="Title" HeaderText="Title" />
                            <asp:BoundField DataField="Summary" HeaderText="Summary" />
                        </Columns>
                    </asp:GridView>
                </ContentTemplate>
            </asp:UpdatePanel>
            
        </td>
        <td>          
            &nbsp;</td>
    </tr>
 
 
    <tr>
        <td class="style1">
            &nbsp;</td>
        <td class="style1">
           
            <asp:ValidationSummary ID="ValidationSummary1" runat="server" />
        </td>
        <td class="style1">
           
            &nbsp;</td>
    </tr>
    <tr>
        <td colspan="2">
            <asp:UpdateProgress runat="server">
                <ProgressTemplate>
                    Loading ... 
                    <img src="../Images/ajax-loader.gif" />
                </ProgressTemplate>
            </asp:UpdateProgress>


            </td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
             &nbsp;</td>
        <td>
            &nbsp;</td>
        <td>
            &nbsp;</td>
    </tr>
    <tr>
        <td>
            &nbsp;</td>
        <td>

        <asp:UpdatePanel ID="UpdatePanel2" runat="server" >
        <ContentTemplate>
            <asp:ObjectDataSource ID="odsCategories" runat="server" 
                        OldValuesParameterFormatString="original_{0}" SelectMethod="GetCategorias" 
                        TypeName="Skynet.WebAdministracion.Views.ExamsMgm.ExamsMgmPresenter">
                    </asp:ObjectDataSource>
                    <asp:ObjectDataSource ID="odsExams" runat="server" 
                        OldValuesParameterFormatString="original_{0}" SelectMethod="GetExamenes" 
                        TypeName="Skynet.WebAdministracion.Views.ExamsMgm.ExamsMgmPresenter" 
                        DataObjectTypeName="Skynet.BusinessEntities.Exam" DeleteMethod="DeleteExam" 
                        ondeleted="odsExams_Deleted">
                        <SelectParameters>
                            <asp:ControlParameter ControlID="ddlCategories" DbType="Guid" Name="CategoryId" 
                                PropertyName="SelectedValue" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
        </ContentTemplate>
        </asp:UpdatePanel>
            
        </td>
        <td>
            &nbsp;</td>
    </tr>
</table>        
</asp:Content>
